<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/layout/template.xhtml">

    <ui:define name="content">
        <h:form>
            <p:panel header="key">
                String key = Hex.encodeToString(new AesCipherService().generateNewKey().getEncoded());
                System.out.println("0x" + key);
                key = <h:outputText value="#{securityInfo.key}"/><br/>
                <p:commandButton value="重新生成" actionListener="#{securityInfo.regen}" update="@form"/>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>
